#ifndef PHYSICS_PRIMITIVES_HEADER
#define PHYSICS_PRIMITIVES_HEADER

#include "Box2D/Box2D.h"
#include "Globals.h"

class GameEntity;

//Everything inherits from physics primitive
class PhysicsPrimitive {
public:
	PhysicsPrimitive()
		: mShape(NULL),
	      mFixture(NULL)
	{}

	b2Shape * mShape;
	b2Fixture * mFixture;
	b2Body * mBody;
	GameEntity * mGameEntity;
	
	void AddLinearVelocity( const b2Vec2 & inVel );
	
	void SetLinearVelocity( const b2Vec2 & inVec );

	void AttachGameEntity ( GameEntity * inEntity );

	//Gets the rotation about the z axis.  
	float GetAngle();
	
	//Returns body position
	b2Vec2 GetPos();
	
	b2Vec2 GetLinearVelocity();

	//Contains all physical properties to
	//describe this shape.
	PhysicsProperties mProperties;
};

//PhysicsBox knows nothing about the world around it.
//It's just a pore little shape
class PhysicsBox : public PhysicsPrimitive {
public:

	//Inbody has been created via world.
	PhysicsBox ( const b2Vec2 & topRight, 
		const b2Vec2 & topLeft, 
		float thickness,
		const PhysicsProperties & inProps);
};

//Pore little circle
class PhysicsCircle : public PhysicsPrimitive {
public:
	PhysicsCircle (float rad, const PhysicsProperties & inProps );
};

//PhysicsChain 
class PhysicsChain : public PhysicsPrimitive {
public:
	PhysicsChain( const b2Vec2 * pos, int numVerts, const PhysicsProperties & inProps );
};

#endif